.class final Lcom/ninesky/browser/cl;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private synthetic a:Lcom/ninesky/browser/DownloadActivity;


# direct methods
.method constructor <init>(Lcom/ninesky/browser/DownloadActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/cl;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 8

    const/4 v7, 0x0

    const/4 v6, 0x1

    iget-object v0, p0, Lcom/ninesky/browser/cl;->a:Lcom/ninesky/browser/DownloadActivity;

    iget-object v1, p0, Lcom/ninesky/browser/cl;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v1}, Lcom/ninesky/browser/DownloadActivity;->d(Lcom/ninesky/browser/DownloadActivity;)J

    move-result-wide v1

    const-wide/16 v3, -0x1

    cmp-long v3, v1, v3

    if-eqz v3, :cond_0

    new-instance v3, Landroid/content/ContentValues;

    invoke-direct {v3}, Landroid/content/ContentValues;-><init>()V

    const-string v4, "control"

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    const-string v4, "_id=?"

    new-array v5, v6, [Ljava/lang/String;

    invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v5, v7

    invoke-virtual {v0}, Lcom/ninesky/browser/DownloadActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    sget-object v1, Lcom/ninesky/browser/provider/downloads/e;->a:Landroid/net/Uri;

    invoke-virtual {v0, v1, v3, v4, v5}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/cl;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v0}, Lcom/ninesky/browser/DownloadActivity;->e(Lcom/ninesky/browser/DownloadActivity;)V

    iget-object v0, p0, Lcom/ninesky/browser/cl;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v0}, Lcom/ninesky/browser/DownloadActivity;->f(Lcom/ninesky/browser/DownloadActivity;)V

    new-array v0, v6, [Lcom/ninesky/widget/g;

    iget-object v1, p0, Lcom/ninesky/browser/cl;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v1}, Lcom/ninesky/browser/DownloadActivity;->h(Lcom/ninesky/browser/DownloadActivity;)Lcom/ninesky/widget/l;

    move-result-object v1

    aput-object v1, v0, v7

    invoke-static {v0}, Lcom/ninesky/browser/DownloadActivity;->a([Lcom/ninesky/widget/g;)V

    iget-object v0, p0, Lcom/ninesky/browser/cl;->a:Lcom/ninesky/browser/DownloadActivity;

    const-string v1, "Download"

    const-string v2, "Pause"

    invoke-static {v0, v1, v2}, Lcom/mobclick/android/c;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method
